import React from 'react'

export default class Child extends React.Component{
  constructor (props) {
    super(props)
    this.state = {
      count: 0
    }
  }
  componentWillMount () {
    console.log("componet will mount")
  }
  componentDidMount () {
    console.log('component did mount')
  }

  
  componentWillReceiveProps (newVal) {
    console.log('will receive props' + newVal)
  }
  shouldComponentUpdate () {
    console.log('should component update')
    return true
  }

  componentWillUpdate () {
    console.log('will update')
  }
  componentDidUpdate () {
    console.log('did update')
  }
  render(){
    return (
      <div>
        <p>{this.props.name}</p>
      </div>
    )
  }
}